package com.gzx.plugin.website.access.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzx.plugin.website.access.bo.GzxAccessLogAddBo;
import com.gzx.plugin.website.access.bo.GzxAccessLogPageBo;
import com.gzx.plugin.website.access.entity.GzxAccessLog;
import com.gzx.plugin.website.access.vo.GzxAccessLogVo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

/**
 * @author zjt
 * @description
 * @since 2025/4/17 16:24
 */
public interface GzxAccessLogService {

    /**
     * 发送短信验证码
     *
     * @param phone
     * @param httpServletRequest
     */
    Integer smsVc(String phone, HttpServletRequest httpServletRequest);

    /**
     * 验证短信验证码
     *
     * @param accessLogAddBo
     * @param httpServletRequest
     */
    String verifySmsVc(GzxAccessLogAddBo accessLogAddBo, HttpServletRequest httpServletRequest);

    /**
     * 新增访问记录
     *
     * @param ip
     * @param configId
     * @param phone
     * @param debtorCardId
     */
    void add(String ip, Long configId, String phone, String debtorCardId);

    /**
     * 查询访问记录
     *
     * @param accessLogPageBo
     */
    Page<GzxAccessLogVo> pageList(GzxAccessLogPageBo accessLogPageBo);

    /**
     * 访问记录导出
     *
     * @param accessLogPageBo
     * @param httpServletResponse
     */
    void exportAccessLog(GzxAccessLogPageBo accessLogPageBo, HttpServletResponse httpServletResponse);

    /**
     * 同步访问记录
     *
     * @param accessLogList
     */
    void insertBatch(List<GzxAccessLog> accessLogList);
}
